import VueRouter from 'vue-router'
// 导入对应的路由组件
import Home from './components/tabar/Home.vue'
import Member from './components/tabar/Member.vue'
import Shopping from './components/tabar/Shopping.vue'
import Search from './components/tabar/Search.vue'

// 创建路由对象
var router = new VueRouter({
    routes:[ //配置路由规则
        {path:'/',redirect:'/home'},
        {path:'/home',component:Home},
        {path:'/member',component:Member},
        {path:'/shopping',component:Shopping},
        {path:'/search',component:Search}
    ],
    linkActiveClass:'mui-active' //覆盖默认的路由高亮的类名，默认的类名叫做router-link-active
})

// 把路由对象暴露出去
export default router